#define _CRT_SECURE_NO_WARNINGS 1
#include"DSeqlist.h"

void test_01(void)
{
	LN* phead = NULL;
	phead = LNCreate();

	LNPushfront(phead, 1);
	LNPushfront(phead, 2);
	LNPushfront(phead, 3);
	LNPushfront(phead, 4);
	LNPushfront(phead, 5);
	LNPrint(phead);

	LNPushback(phead, 1);
	LNPushback(phead, 2);
	LNPushback(phead, 3);
	LNPushback(phead, 4);
	LNPushback(phead, 5);
	LNPrint(phead);
}


void test_02(void)
{
	LN* phead = NULL;
	phead = LNCreate();

	LNPushfront(phead, 1);
	LNPushfront(phead, 2);
	LNPushfront(phead, 3);
	LNPushfront(phead, 4);
	LNPushfront(phead, 5);
	LNPrint(phead);

	LNPopback(phead);
	LNPrint(phead);

	LNPopfront(phead);
	LNPrint(phead);

}

void test_03(void)
{
	LN* phead = NULL;
	phead = LNCreate();

	LNPushfront(phead, 1);
	LNPushfront(phead, 2);
	LNPushfront(phead, 3);
	LNPushfront(phead, 4);
	LNPushfront(phead, 5);
	LNPrint(phead);

	LN* find = LNFind(phead, 3);
	LNInsert(find, 100);
	LNPrint(phead);

	LNErase(find);
	LNPrint(phead);

}


int main()
{
	//test_01();
	//test_02();
	test_03();

	return 0;
}
